<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <script src="prototype.js" type="text/javascript"></script>
  <script src="string.vbs" type="text/vbscript"></script>
 </HEAD>

 <BODY>
	<TABLE id='test' width='1000px'>
	 <TR>
		<TD>
		  <input name=rp size="35" value="gm" maxlength="3">
		</TD>
	 </TR>
	 <TR>
		<TD>
		  <input name=rx size="100" value="" maxlength="100000">
		</TD>
	 </TR>
	 <TR>
		<TD>
		  <input name=wd size="100" value="" maxlength="1000000">
		</TD>
	 </TR>
	 <TR>
		<TD>
		  <input name=xlink size="100" value="" maxlength="1000000">
		</TD>
	 </TR>
	 <TR>
		<TD>
		  <input type=button value=test onclick='show();'>
		</TD>
	 </TR>
	 <TR>
		<TD>
          <div id='info'></div>
		</TD>
	 </TR>
	</TABLE>
  <SCRIPT LANGUAGE="JavaScript">
function d(text){
  var r = RegExp(rx.value, rp.value);
  var a = text.match(r);
  var s = '';
  if(a){
    for(var i=0; i<a.length; i++){
	  s += '<hr>[' + i + ']<br>'+ a[i].escapeHTML();
	}
  }
  else
    s = 'null';
  $('info').innerHTML = s;
}
function show(){
  if(xlink.value.length != 0){
    new Ajax.Request(xlink.value, {method:'get',onSuccess:function(rs){var text = bytes2BSTR(rs.responseBody);d(text);}});
  }
  else{
    d(wd.value);
  }
};

  </SCRIPT>
 </BODY>
</HTML>
